<include file="public+header">

   <!-- 标题  -->
   <div class="title"><lang>运行SQL 语句</lang> ( <a href="{:G::U('backup/index')}"><lang>数据库备份</lang></a> | <a href="{:G::U('backup/restore')}"><lang>数据库恢复</lang></a> |<a href="{:G::U('backup/optimize')}"><lang>数据库优化</lang></a> )</div>

  <!-- 正文 -->
  <div id="content" class="content">
     <form method="post" action="" onsubmit="return validate()">
      <table class="form-table full">
          <tr>
              <th valign="top"><label for="sql"  class="field"><lang>运行 SQL查询</lang></label></td>
              <td><textarea name="sql" id="sql" rows="6" cols="80" class="field"><if condition="isset( $sSql )">{$sSql}</if></textarea>
              <div class="warning"><lang>执行SQL将直接操作数据库，请谨慎使用</lang></div></td>
            </tr>
          <tr>
              <th valign="top"><label for="button"  class="field"><lang>优化操作</lang> </label></td>
              <td><input type="submit" value="  <lang>运行sql语句</lang>   " class="button" />
              <div class="description"><lang>及时清理数据库碎片，能够加快数据库查询速度</lang></div>
              </td>
            </tr>

      </table>
      </form>
{script}
function validate(){

  if( Dyhb.Dom.$('sql').value=='' ){

      dyhbAlert( D.L( 'SQL语句不能为空！') );
      return false;
  }

  return true;
}
//-->
{/script}

      <if condition=" isset( $nType ) && $nType==-1 ">
      <div id="content_warning"><span style="color: rgb(255, 0, 0);"><strong><lang>错误提示</lang>：</strong></span><br />
      {$sError}</div>
      <elseif condition=" isset( $nType ) && $nType==1 ">
      <div id="content_warning">
      <center><h3><lang>执行成功</lang></h3></center>
      </div>
      <elseif condition=" isset( $nType ) && $nType==2 " >
        {$sResult}
      </if>

   </div>
   <!-- end content -->

<include file="public+footer">